import { http } from "@/utils/http";

/** 员工信息列表 */
export const itemList = (data?: object) => {
  return http.request<any>("post", "api/user/index/index", { data });
};
/** 员工信息添加 */
export const addItem = (data?: object) => {
  return http.request<any>("post", "api/user/index/add", { data });
};

/** 员工信息删除 */
export const delItem = (data?: object) => {
  return http.request<any>("post", "api/user/index/del", { data });
};

/** 员工信息-岗位调整 */
export const transfer = (data?: object) => {
  return http.request<any>("post", "api/user/index/transfer", { data });
};

/** 员工信息-档级调整 */
export const adjust = (data?: object) => {
  return http.request<any>("post", "api/user/index/adjust", { data });
};

/** 员工信息-编辑 */
export const editItem = (data?: object) => {
  return http.request<any>("post", "api/user/index/edit", { data });
};

/** 组织架构-树形菜单 */
export const compList = (data?: object) => {
  return http.request<any>("post", "api/organization/index/index", { data });
};

/** 项目管理-列表 */
export const projectList = (data?: object) => {
  return http.request<any>("post", "api/organization/project/index", { data });
};

/** 档级管理-列表 */
export const gradeList = (data?: object) => {
  return http.request<any>("post", "api/grade/index/index", { data });
};

/** 证书分类-列表 */
export const certclass = (data?: object) => {
  return http.request<any>("post", "api/user/certclass/index", { data });
};

/** 证书回显 */
export const cerdshow = (data?: object) => {
  return http.request<any>("post", "api/user/usercert/index", { data });
};

/** 证书添加、编辑 */
export const cerdadd = (data?: object) => {
  return http.request<any>("post", "api/user/usercert/edit", { data });
};

/** 证书删除 */
export const cerdel = (data?: object) => {
  return http.request<any>("post", "api/user/usercert/del", { data });
};

// 图片上传接口
export const reqUpload = (data?: object) => {
  return http.request<any>("post", "/api/common/upload", { data });
};